package com.yang.webapi.module.controller;

import com.yang.webapi.module.service.TitleWebService;
import com.zhy.base.webapi.annoation.ResponseFormatter;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by baipan
 * Date: 2019/12/30 0030
 */
@Slf4j
@ResponseFormatter
@RestController
@RequestMapping("title")
@Api(tags = "头条模块", description = "titleController")
public class TitleController {
    @Autowired
    private TitleWebService titleWebService;

    @ApiOperation("获取头条信息")
    @GetMapping("title")
    public List<String> getTitle(){
        return titleWebService.getTitle();
    }
}
